home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2037 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.2 KB

  1. Path: li.net!usenet
  2. From: bsilvern@li.net (Bob Silvern)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: memory model question
  5. Date: Mon, 15 Jan 1996 06:47:44 GMT
  6. Organization: Harmony Graphics
  7. Message-ID: <4dctau$rdj@linet02.li.net>
  8. References: <4d94go$sp0@cantaloupe.srv.cs.cmu.edu>
  9. NNTP-Posting-Host: lisuser53.li.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. bmm+@BMM.PC.CS.CMU.EDU (Bruce Maggs) wrote:
  13.  
  14.  
  15. >Hi,
  16.  
  17. >I'm compiling a C program using Borland's C++ for DOS.  It's a large
  18. >program, but doesn't use much static memory.  I've selected the
  19. >"small" memory model.  The program compiles and runs without any
  20. >problems, but the length of the .exe file that the compiler produces
  21. >is 148K.  I thought that in the small memory model the length of the
  22. >code would be limited to one segment, i.e., 64K.  I'm curious about
  23. >what's going on here.  Does the compiler automatically split my code
  24. >into two or more segments?
  25.  
  26. >Thanks,
  27.  
  28. >Bruce Maggs
  29.  
  30.  
  31. One factor that can cause your exe to be large is the inclusion of debug
  32. information (variable names, addresses, etc.).  Check your linker options and
  33. disable linking debug info.  You won't be able to debug the program though
  34. unless you link with debug info included.
  35.  
  36.  
  37.